Fix building with current rust
authorBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 26 Aug 2014 18:55:39 +0000 (20:55 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 26 Aug 2014 18:55:39 +0000 (20:55 +0200)
Cargo.lock
src/cargo/sources/git/source.rs
src/cargo/util/to_url.rs
tests/test_cargo_compile.rs

index f38573f0d527913c609af7e4524b7eda6738fe72..6b02ba227f72b10df17cb8cedba4eaab1327a3ad 100644 (file)
@@ -2,31 +2,31 @@
 name = "cargo"
 version = "0.0.1-pre"
 dependencies = [
- "docopt 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fd2377d1c36b2671136cd36566aad5d54c2fb17e)",
- "docopt_macros 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fd2377d1c36b2671136cd36566aad5d54c2fb17e)",
+ "docopt 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fc7ba2f1a5a351f7874257d880223d2ff5c75d36)",
+ "docopt_macros 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fc7ba2f1a5a351f7874257d880223d2ff5c75d36)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#f0fd1546b0a7a278a12658ab8602b5c827cc3a42)",
- "semver 0.0.1 (git+https://github.com/rust-lang/semver#e17191f51d543529a6f07e6731802b77977fcef8)",
- "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#e7c7bba846fea549fe4e93de4c9d21e851a9882f)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
+ "semver 0.0.1 (git+https://github.com/rust-lang/semver#c78b40d7fdf8acd99b503e6ce394fbcf9eb8982f)",
+ "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8c128cb550ba66d4962cd81acca93857c605eaa0)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#23fb9ec22cca9d643ad2cce9894a947c005b7fe2)",
 ]
 
 [[package]]
 name = "docopt"
 version = "0.6.0"
-source = "git+https://github.com/burntsushi/docopt.rs#fd2377d1c36b2671136cd36566aad5d54c2fb17e"
+source = "git+https://github.com/burntsushi/docopt.rs#fc7ba2f1a5a351f7874257d880223d2ff5c75d36"
 
 [[package]]
 name = "docopt_macros"
 version = "0.6.0"
-source = "git+https://github.com/burntsushi/docopt.rs#fd2377d1c36b2671136cd36566aad5d54c2fb17e"
+source = "git+https://github.com/burntsushi/docopt.rs#fc7ba2f1a5a351f7874257d880223d2ff5c75d36"
 dependencies = [
- "docopt 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fd2377d1c36b2671136cd36566aad5d54c2fb17e)",
+ "docopt 0.6.0 (git+https://github.com/burntsushi/docopt.rs#fc7ba2f1a5a351f7874257d880223d2ff5c75d36)",
 ]
 
 [[package]]
 name = "encoding"
 version = "0.1.0"
-source = "git+https://github.com/lifthrasiir/rust-encoding#b82ad2104b2d079620bd227fb9328b2ff8c20ca9"
+source = "git+https://github.com/lifthrasiir/rust-encoding#7e7950ddbd46428a439db3e2594fa78f0972ef2e"
 
 [[package]]
 name = "hamcrest"
@@ -36,18 +36,18 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#f0fd1546b0a7a278a1
 [[package]]
 name = "semver"
 version = "0.0.1"
-source = "git+https://github.com/rust-lang/semver#e17191f51d543529a6f07e6731802b77977fcef8"
+source = "git+https://github.com/rust-lang/semver#c78b40d7fdf8acd99b503e6ce394fbcf9eb8982f"
 
 [[package]]
 name = "toml"
 version = "0.1.0"
-source = "git+https://github.com/alexcrichton/toml-rs#e7c7bba846fea549fe4e93de4c9d21e851a9882f"
+source = "git+https://github.com/alexcrichton/toml-rs#8c128cb550ba66d4962cd81acca93857c605eaa0"
 
 [[package]]
 name = "url"
 version = "0.1.0"
-source = "git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a"
+source = "git+https://github.com/servo/rust-url#23fb9ec22cca9d643ad2cce9894a947c005b7fe2"
 dependencies = [
- "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#b82ad2104b2d079620bd227fb9328b2ff8c20ca9)",
+ "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#7e7950ddbd46428a439db3e2594fa78f0972ef2e)",
 ]
 
index 4d589d62c818041eed92baef94e9cfb8c5f3b684..906f5140e0e0378ce29b433ac3feab260c82b9b1 100644 (file)
@@ -106,7 +106,8 @@ pub fn canonicalize_url(url: &Url) -> Url {
         url.scheme = "https".to_string();
         match url.scheme_data {
             url::RelativeSchemeData(ref mut rel) => {
-                rel.port = "443".to_string();
+                rel.port = Some(443);
+                rel.default_port = Some(443);
                 let path = mem::replace(&mut rel.path, Vec::new());
                 rel.path = path.move_iter().map(|s| {
                     s.as_slice().chars().map(|c| c.to_lowercase()).collect()
index 93df2b30c8a0c537fb89d038227c83792fe62fb5..c99ba4d271f6b73bfc6c63f0f2fe3fc516017b1f 100644 (file)
@@ -26,8 +26,8 @@ impl<'a> ToUrl for &'a str {
 
 fn mapper(s: &str) -> url::SchemeType {
     match s {
-        "git" => url::RelativeScheme("9418"),
-        "ssh" => url::RelativeScheme("22"),
+        "git" => url::RelativeScheme(9418),
+        "ssh" => url::RelativeScheme(22),
         s => url::whatwg_scheme_type_mapper(s),
     }
 }
index 7bf37e965c8c493b7f88a7aabb880d3920ff0203..e3f7f79ee2d679b79b2ca200193b8286fea61636 100644 (file)
@@ -100,7 +100,7 @@ test!(cargo_compile_with_invalid_code {
         execs()
         .with_status(101)
         .with_stderr(format!("\
-{filename}:1:1: 1:8 error: expected item but found `invalid`
+{filename}:1:1: 1:8 error: expected item, found `invalid`
 {filename}:1 invalid rust code!
              ^~~~~~~
 Could not compile `foo`.